--[[----------------------------------------------------
		Create ConVar
------------------------------------------------------]]
usermessage.Hook("wire_expression2_create_convar", function(um)
	local name = um:ReadString()
	local default = um:ReadString() or ""
	local ShouldSave = um:ReadBool() or false
	local userdata = um:ReadBool() or false
	
	if not name then return end
	
	CreateClientConVar(name, default, ShouldSave, userdata)
end)


--[[----------------------------------------------------
		E2 description
------------------------------------------------------]]
if E2Helper then
	E2Helper.Descriptions["convarCreate(s)"] = "Creates a convar."
	E2Helper.Descriptions["convarCreate(ss)"] = "Creates a convar."
	E2Helper.Descriptions["convarCreate(ssn)"] = [[
		Creates a convar.
		ShouldSave: Should the ConVar be saved and loaded when you start a new game?
	]]
	E2Helper.Descriptions["convarCreate(ssnn)"] = [[
		Creates a convar.
		ShouldSave: Should the ConVar be saved and loaded when you start a new game?
		SendToServer: When true, then the ConVar will be send to server when it changes.
	]]
end